home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
dev
/
mui
/
MCC_TableGroup.lha
/
MCC_TableGroup
/
Developer
/
Autodocs
/
MCC_TableGroup.doc
Wrap
Text File
|
1999-01-12
|
20KB
|
670 lines
TABLE OF CONTENTS
TableGroup.mcc/--background--
TableGroup.mcc/MUIA_TableGroup_CellHorizWeight
TableGroup.mcc/MUIA_TableGroup_CellVertWeight
TableGroup.mcc/MUIA_TableGroup_Column
TableGroup.mcc/MUIA_TableGroup_Columns
TableGroup.mcc/MUIA_TableGroup_ColumnSpace
TableGroup.mcc/MUIA_TableGroup_ColumnSpan
TableGroup.mcc/MUIA_TableGroup_ColumnWeight
TableGroup.mcc/MUIA_TableGroup_DropType
TableGroup.mcc/MUIA_TableGroup_EmptyCells
TableGroup.mcc/MUIA_TableGroup_Error
TableGroup.mcc/MUIA_TableGroup_Find
TableGroup.mcc/MUIA_TableGroup_GrowsTo
TableGroup.mcc/MUIA_TableGroup_NextColumn
TableGroup.mcc/MUIA_TableGroup_NextRow
TableGroup.mcc/MUIA_TableGroup_Pool
TableGroup.mcc/MUIA_TableGroup_PoolPuddleSize
TableGroup.mcc/MUIA_TableGroup_PoolThreshSize
TableGroup.mcc/MUIA_TableGroup_Row
TableGroup.mcc/MUIA_TableGroup_Rows
TableGroup.mcc/MUIA_TableGroup_RowSpace
TableGroup.mcc/MUIA_TableGroup_RowSpan
TableGroup.mcc/MUIA_TableGroup_RowWeight
TableGroup.mcc/MUIA_TableGroup_SkipColumns
TableGroup.mcc/MUIA_TableGroup_SkipRows
Group.mui/MUIA_Group_Child
TableGroup.mcc/MUIM_TableGroup_Clear
TableGroup.mcc/MUIM_TableGroup_Insert
TableGroup.mcc/MUIM_TableGroup_Remove
TableGroup.mcc/MUIM_TableGroup_Replace
root/AddMember
root/RemMember
TableGroup.mcc/--background--
NAME
TableGroup -- ... (V1 )
FUNCTION
TableGroup is a Custom Class of the Magic User Interface © by
Stefan Stuntz.
It's a subclass of group-class and uses the MUIA_Group_LayoutHook
to do advanced row/column group layout.
The motivation for this class was the wish that several super classes
of an (not necessarily MUI) object can add their GUI objects
to one group which generates a uniform look although different numbers
of columns occur. But you may find this useful for much more usages.
A table consists of a number of rows, columns and cells. The cells
are containers for area objects, they may keep empty. As in
all MUI groups using the same object multiple times is
forbidden. Cells are addressed via their coordinates.
The MUIA_Group_Child tag is also used for TableGroups,
unlike normal MUI groups you are allowed to add new objects
later with the Set method and this tag or with AddMember.
NOTES
None at the moment.
BUGS
If TableGroup calls OpenLibrary during its LibInit procedure and
causes loading muimaster.library from disk, it hangs while this
OpenLibrary call. SnoopDos tells that the muimaster.library's
init func waits when it tries to open screennotify.library (no
difference if installed or not). This error occurs if you
directly load the TableGroup.mcc with LoadLibrary or a self
written program which simply does CloseLibrary (OpenLibrary
("TableGroup.mcc", 0)). If you run a program that uses TableGroup
this error should not occur, since your program will open
muimaster.library by itself before.
To find out more about this error I removed some critical parts
of the LibInit function for tests: If I remove the installation
of a private stack (20kB), the machine crashes earlier than
before, namely when muimaster.library tries to open
muigfx.library. With this private stack muimaster hangs (it seems
that ramlib is blocked) when loading screennotify. At this time
1200 bytes of the ramlib stack are used. In earlier versions of
TableGroup.mcc only a7 was modified, now StackSwap is used for
this purpose, but this does not solve the problem. Also adjusting
stack information of the process structure (and not only of task
structure) to prevent stack check errors does not help. I
included two versions of MCCTableGroup: TableGroup.mcc works on a
private stack while its LibInit function,
TableGroupRamLibStack.mcc does not touch the stack location given
from ramlib. But it is not clear if the stack is the cause of the
described bug.
There is also an exception handler (neither Exec nor MC68000
exceptions, but the exceptions supported by my programming
language Cluster) that could be the reason for all the trouble.
But removing it does not change anything. This exception handler
temporary modifies the TrapData field of the calling task (in case
of LibInit the ramlib process).
Take into account that the LibInit function works fine if run in
a debugger's context (in my case Disect). Please help, I can not
release this MCC before this bug is fixed!
Group class (current muimaster version 19) seems not to care about
its MUIA_Group_(Horiz|Vert)Spacing values when used with a layout
hook. To get the user settings for spacing though, TableGroup
creates a normal group object as child of itself to ask it for the
default values. That's why you should be prepared to find objects in
the MUIA_Group_ChildList you have not added by yourself. Do not
assume in which position and number foreign objects appear in this
list. If you want to delete all childs of a table group better
remove them with MUIM_TableGroup_Remove.
TableGroup.mcc/MUIA_TableGroup_CellHorizWeight
NAME
MUIA_TableGroup_CellHorizWeight -- (V1 ) [ISG], ULONG
FUNCTION
Set the horizontal weight of the current cell. Only of interest if
the cell is empty otherwise the cell's object's weight is used.
Defaults to 100.
SEE ALSO
MUIA_TableGroup_CellVertWeight,
MUIA_TableGroup_ColumnWeight, MUIA_TableGroup_RowWeight
TableGroup.mcc/MUIA_TableGroup_CellVertWeight
NAME
MUIA_TableGroup_CellVertWeight -- (V1 ) [ISG], ULONG
FUNCTION
Set the vertical weight of the current cell. Only of interest if
the cell is empty otherwise the cell's object's weight is used.
Defaults to 100.
SEE ALSO
MUIA_TableGroup_CellHorizWeight,
MUIA_TableGroup_ColumnWeight, MUIA_TableGroup_RowWeight
TableGroup.mcc/MUIA_TableGroup_Column
NAME
MUIA_TableGroup_Column -- (V1 ) [ISG], ULONG
FUNCTION
Jumps to the cell at the specified column of the current row and
makes it the current one.
You can get this attribute if you want to know the current
column.
Never forget: Mathematicians begin counting at zero!
SEE ALSO
MUIA_TableGroup_Row,
MUIA_TableGroup_NextRow, MUIA_TableGroup_NextColumn
TableGroup.mcc/MUIA_TableGroup_Columns
NAME
MUIA_TableGroup_Columns -- (V1 ) [I.G], ULONG
FUNCTION
Fixes the number of columns to the specified one.
Later this can only be changed by MUIM_TableGroup_Insert
and MUIM_TableGroup_Remove.
SEE ALSO
MUIA_TableGroup_Rows,
MUIA_TableGroup_GrowsTo,
MUIM_TableGroup_Insert, MUIM_TableGroup_Remove
TableGroup.mcc/MUIA_TableGroup_ColumnSpace
NAME
MUIA_TableGroup_ColumnSpace -- (V1 ) [ISG], ULONG
FUNCTION
Defines a space that shall be inserted between the current and the
previous column.
Measured in font width units.
NOTES
If you really need fractional numbers, what I don't hope,
tell me.
SEE ALSO
MUIA_TableGroup_RowSpace
TableGroup.mcc/MUIA_TableGroup_ColumnSpan
NAME
MUIA_TableGroup_ColumnSpan -- (V1 ) [ISG], ULONG
FUNCTION
Join n cells right from and inclusively the current to one big cell.
A cell can span both multiple columns and multiple rows.
It acts like the COLSPAN attribute of an HTML table.
SEE ALSO
MUIA_TableGroup_RowSpan
TableGroup.mcc/MUIA_TableGroup_ColumnWeight
NAME
MUIA_TableGroup_ColumnWeight -- (V1 ) [I.G], ULONG
FUNCTION
Set the horizontal weight of the current column.
Using MUIA_TableGroup_ColumnWeight or MUIA_TableGroup_RowWeight
will make the table group ignoring any weight that is
specified for empty cells or child objects of the complete
table!
Defaults to 100.
SEE ALSO
MUIA_TableGroup_RowWeight,
MUIA_TableGroup_CellHorizWeight, MUIA_TableGroup_CellVertWeight
TableGroup.mcc/MUIA_TableGroup_EmptyCells
NAME
MUIA_TableGroup_EmptyCells -- (V1 ) [IS.], ULONG
FUNCTION
Clears the next n cells. According to MUIA_TableGroup_GrowsTo it
skips to the begin of the next row/column when the end of a
row/column is reached and extends the table if necessary. After
that the cell just after the last cleared becomes the current one.
This attribute can be used either to skip some cells or to dispose
some objects.
SEE ALSO
MUIA_TableGroup_SkipRows, MUIA_TableGroup_SkipColumns
TableGroup.mcc/MUIA_TableGroup_Error
NAME
MUIA_TableGroup_Error -- (V1 ) [..G], ULONG
FUNCTION
Find out the last error which occured since last request.
SPECIAL VALUES
MUIV_TableGroup_Error_None
No new error occured
MUIV_TableGroup_Error_NotEnoughMemory
Do not write such memory wasting programs!
MUIV_TableGroup_Error_NoSize
The table has no width relative to the grow direction you gave at
MUIA_TableGroup_GrowsTo. Probably you forgot to specify
MUIA_TableGroup_Columns or MUIA_TableGroup_Rows
MUIV_TableGroup_Error_ObjectAlreadyMember
You tried to insert an object that is already contained in
the table. You are lucky that your machine is still not crashed.
MUIV_TableGroup_Error_ObjectNotAMember
You tried to remove an object that was never added to the
table.
SEE ALSO
TableGroup.mcc/MUIA_TableGroup_Find
NAME
MUIA_TableGroup_Find -- (V1 ) [IS.], Object *
FUNCTION
Find the cell the specified object is in and make it the
current one. After that you can ask with MUIA_TableGroup_Row and
MUIA_TableGroup_Column for the coordinates of this cell. If the
object cannot be found, the error TableGroup_Error_ObjectNotAMember
is raised and the position of the current cell is left unchanged.
SEE ALSO
MUIA_TableGroup_Error
TableGroup.mcc/MUIA_TableGroup_GrowsTo
NAME
MUIA_TableGroup_GrowsTo -- (V1 ) [ISG], ULONG
FUNCTION
Specify the direction the table shall be automatically extended to
if necessary.
Defaults to MUIV_TableGroup_Direction_Down
SPECIAL VALUES
MUIV_TableGroup_Direction_Down
The table is filled from left to right and from top to bottom.
If the table is to small it will be extended downward.
MUIV_TableGroup_Direction_Right
The table is filled from top to bottom and from left to right.
If the table is to small it will be extended to the right.
SEE ALSO
TableGroup.mcc/MUIA_TableGroup_NextColumn
NAME
MUIA_TableGroup_NextColumn -- (V1 ) [IS.], ULONG
FUNCTION
Jumps to the specified column and extends the table if necessary.
If the table grows downwards, a new row is used when the specified
column is left from the current.
If the table grows to the right, a new column is appended when the
specified column is right from the right table border.
Never forget: Mathematicians begin counting at zero!
SEE ALSO
MUIA_TableGroup_NextRow,
MUIA_TableGroup_Row, MUIA_TableGroup_Column
TableGroup.mcc/MUIA_TableGroup_NextRow
NAME
MUIA_TableGroup_NextRow -- (V1 ) [IS.], ULONG
FUNCTION
Jumps to the specified row and extends the table if necessary.
If the table grows to the right, a new column is used when the specified
row is above the current.
If the table grows downwards, a new row is appended when the
specified row is below the bottom.
Never forget: Mathematicians begin counting at zero!
SEE ALSO
MUIA_TableGroup_NextColumn,
MUIA_TableGroup_Row, MUIA_TableGroup_Column
TableGroup.mcc/MUIA_TableGroup_Pool
NAME
MUIA_TableGroup_Pool -- (V1 ) [I.G], PoolHeader *
FUNCTION
Pass something from CreatePool() here if you dont want the table
to create its own memory pool but use this one instead. Note
that table group class does *not* use semaphore protection when
accessing the pool, you must *not* use pools which are
accessed from different tasks than the applications main
task.
SEE ALSO
MUIA_TableGroup_PoolPuddleSize, MUIA_TableGroup_PoolThreshSize
TableGroup.mcc/MUIA_TableGroup_PoolPuddleSize
NAME
MUIA_TableGroup_PoolPuddleSize -- (V1 ) [I..], ULONG
FUNCTION
Specify the puddle size for the tables memory pool.
Defaults to 2048. Is ignored if you specify your
own pool with MUIA_TableGroup_Pool.
SEE ALSO
MUIA_TableGroup_PoolThreshSize, MUIA_TableGroup_Pool,
TableGroup.mcc/MUIA_TableGroup_PoolThreshSize
NAME
MUIA_TableGroup_PoolThreshSize -- (V1 ) [I..], ULONG
FUNCTION
Specify the thresh size for the tables memory pool.
Defaults to 1024. Is ignored if you specify your
own pool with MUIA_TableGroup_Pool.
SEE ALSO
MUIA_TableGroup_PoolPuddleSize, MUIA_TableGroup_Pool
TableGroup.mcc/MUIA_TableGroup_Row
NAME
MUIA_TableGroup_Row -- (V1 ) [ISG], ULONG
FUNCTION
Jumps to the cell at the specified row of the current column and
makes it the current one.
You can get this attribute if you want to know the current row.
Never forget: Mathematicians begin counting at zero!
SEE ALSO
MUIA_TableGroup_Column,
MUIA_TableGroup_NextRow, MUIA_TableGroup_NextColumn
TableGroup.mcc/MUIA_TableGroup_Rows
NAME
MUIA_TableGroup_Rows -- (V1 ) [I.G], ULONG
FUNCTION
Fixes the number of rows to the specified one.
Later this can only be changed by MUIM_TableGroup_Insert
and MUIM_TableGroup_Remove.
SEE ALSO
MUIA_TableGroup_Columns,
MUIA_TableGroup_GrowsTo,
MUIM_TableGroup_Insert, MUIM_TableGroup_Remove
TableGroup.mcc/MUIA_TableGroup_RowSpace
NAME
MUIA_TableGroup_RowSpace -- (V1 ) [ISG], ULONG
FUNCTION
Defines a space that shall be inserted between the current and the
previous row.
Measured in font height units.
NOTES
If you really need fractional numbers, what I don't hope,
tell me.
SEE ALSO
MUIA_TableGroup_ColumnSpace
TableGroup.mcc/MUIA_TableGroup_RowSpan
NAME
MUIA_TableGroup_RowSpan -- (V1 ) [ISG], ULONG
FUNCTION
Join n cells down from and inclusively the current to one big cell.
A cell can span both multiple columns and multiple rows.
It acts like the ROWSPAN attribute of an HTML table.
SEE ALSO
MUIA_TableGroup_ColumnSpan
TableGroup.mcc/MUIA_TableGroup_RowWeight
NAME
MUIA_TableGroup_RowWeight -- (V1 ) [I.G], ULONG
FUNCTION
Set the vertical weight of the current row.
Using MUIA_TableGroup_ColumnWeight or MUIA_TableGroup_RowWeight
will make the table group ignoring any weight that is
specified for empty cells or child objects of the complete
table!
Defaults to 100.
SEE ALSO
MUIA_TableGroup_ColumnWeight,
MUIA_TableGroup_CellHorizWeight, MUIA_TableGroup_CellVertWeight
TableGroup.mcc/MUIA_TableGroup_SkipColumns
NAME
MUIA_TableGroup_SkipColumns -- (V1 ) [IS.], LONG
FUNCTION
Skips specified number of columns. Negative numbers means
going to the left. The exact behaviour depends on
MUIA_TableGroup_GrowsTo. If the table grows downwards the row is
changed if the beginning or the end of this row is reached. If the
table grows to the right the table will be extended if you cross the
right border.
Works similar to MUIA_TableGroup_EmptyCells but doesn't clear
the cells.
SEE ALSO
MUIA_TableGroup_EmptyCells, MUIA_TableGroup_SkipRows
TableGroup.mcc/MUIA_TableGroup_SkipRows
NAME
MUIA_TableGroup_SkipRows -- (V1 ) [IS.], LONG
FUNCTION
Skips specified number of rows. Negative numbers means
going upwards. The exact behaviour depends on
MUIA_TableGroup_GrowsTo. If the table grows to the right the column is
changed if the beginning or the end of this column is reached. If the
table grows downward the table will be extended if you cross the
bottom border.
Works similar to MUIA_TableGroup_EmptyCells but doesn't clear
the cells.
SEE ALSO
MUIA_TableGroup_EmptyCells, MUIA_TableGroup_SkipColumns
TableGroup.mcc/MUIA_Group_Child
NAME
MUIA_Group_Child -- (V4 ) [ISG], Object *
FUNCTION
Adds a child to the table and skips to the next cell.
Table groups allow to add child objects in a SetAttrs call, too.
You can mix MUIA_Group_Child with other statements (e.g. for
merging cells), which makes it more comfortable than switching
between AddMember and SetAttrs calls.
Objects that can not be added because of memory deficiency are
simply disposed since it is to difficult to keep track what SetAttrs
has done within the current call. SetAttrs has no return value, so
you must ask for errors after a SetAttrs call which contains
statements that can extend a table. You can do this by notifying or
getting the MUIA_TableGroup_Error attribute. It is possible to do
multiple SetAttrs before asking for errors. You will then get the
last error which occured.
Never forget: Objects added with MUIA_Group_Child are treated as
they would be created just for this group. Removing objects from
one group and adding it to a table group, will lead to trouble
because the object is simply disposed when it cannot be added to the
destination table group. Better use AddMember in this case.
With SetAttrs you know when an error occurs but you don't know which
objects are affected, so simply MUIM_TableGroup_Remove all childs
and clear all pointers to them. Otherwise you will get an incomplete
GUI and invalid pointers.
Setting MUIA_Group_Child will lead to trouble if some children are
again table group's. Be sure you have set the MUIA_Group_Forward
tag to false (still undocumented in V19) then.
Getting the MUIA_Group_Child attribute returns the object
in the current cell.
SEE ALSO
AddMember
TableGroup.mcc/MUIM_TableGroup_Clear
NAME
MUIM_TableGroup_Clear (V1 )
SYNOPSIS
DoMethod(obj,MUIM_TableGroup_Clear, LONG row, LONG column,
LONG rows, LONG columns);
FUNCTION
Clears the cells in the specified clip. The childs are disposed,
the cells remain.
This method will not be forwarded to the table group's children.
SPECIAL VALUES
row
MUIV_TableGroup_Clear_Row_Current
Start at current row
column
MUIV_TableGroup_Clear_Column_Current
Start at current column
rows
MUIV_TableGroup_Clear_Rows_All
Clear up to the last row
columns
MUIV_TableGroup_Clear_Columns_All
Clear up to the last column
SEE ALSO
MUIM_TableGroup_Remove
TableGroup.mcc/MUIM_TableGroup_Insert
NAME
MUIM_TableGroup_Insert (V1 )
SYNOPSIS
DoMethod(obj,MUIM_TableGroup_Insert, LONG pos, LONG num, ULONG dir);
FUNCTION
Inserts num rows/columns before pos_th row/column according to dir.
This method will not be forwarded to the table group's children.
SPECIAL VALUES
pos
MUIV_TableGroup_Insert_Current
Start at current row/column
dir
MUIV_TableGroup_Insert_Row
Insert rows
MUIV_TableGroup_Insert_Column
Insert columns
RESULT
An error code as defined under MUIA_TableGroup_Error
SEE ALSO
TableGroup.mcc/MUIM_TableGroup_Remove
NAME
MUIM_TableGroup_Remove (V1 )
SYNOPSIS
DoMethod(obj,MUIM_TableGroup_Remove, LONG pos, LONG num, ULONG dir);
FUNCTION
Removes num rows/columns beginning from pos_th row/column according
to dir.
This method will not be forwarded to the table group's children.
SPECIAL VALUES
pos
MUIV_TableGroup_Remove_Current
Start at current row/column
num
MUIV_TableGroup_Remove_All
Remove up to the last row/column
dir
MUIV_TableGroup_Remove_Row
Remove rows
MUIV_TableGroup_Remove_Column
Remove columns
SEE ALSO
MUIM_TableGroup_Clear (V1 )
TableGroup.mcc/MUIM_TableGroup_Replace
NAME
MUIM_TableGroup_Replace (V1 )
SYNOPSIS
DoMethod(obj,MUIM_TableGroup_Replace, Object *obj,
ULONG row, ULONG column);
FUNCTION
Puts the object in the cell addressed by row and column. Disposes
the object that was there before.
This method will not be forwarded to the table group's children.
RESULT
An error code as defined under MUIA_TableGroup_Error
SEE ALSO
root/AddMember
NAME
AddMember
FUNCTION
Adds a child to the table and skips to the next cell.
In difference to the plain AddMember table group returns an
error code.
SEE ALSO
MUIA_TableGroup_Error, AddMember
root/RemMember
NAME
RemMember
FUNCTION
Removes a child from the table. The cell the child was in remains
but is empty then.
In difference to the plain RemMember table group returns an
error code.
SEE ALSO
MUIA_TableGroup_Error, RemMember